<?php
/**
 * Created by PhpStorm.
 * User: venki
 * Date: 2023/11/20
 * Time: 11:18
 */

namespace app\forms;

use yii\base\Model;

class VenkiForm extends Model
{
    public string $name;
    public string $email;
    public bool   $selected;
    public bool   $deleted;

    public function rules(): array
    {
        return [
            [['name', 'email'], 'required'],
            ['selected', 'boolean'],
            ['deleted', 'boolean', 'trueValue' => true, 'falseValue' => false, 'strict' => true],
        ];
    }

    public function attributeLabels()
    {
        return [
            'name'     => '用户名',
            'email'    => '邮箱',
            'selected' => '是否选择',
            'deleted'  => '是否删除',
        ];
    }
}